import Vue from 'vue'
import Router from 'vue-router'

// 路由地址
import Index from '@/components/index' // 最外层框架
// router-view内内容
import IndexInfo from '@/components/info/'
import Info from '@/components/info/info'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'landing-page',
      component: Index,
      children: [
        {
          path: '/',
          name: 'index-content',
          component: IndexInfo
        },
        {
          path: '/info',
          name: 'index-info',
          component: Info
        }
      ]
    },
    {
      path: '/',
      redirect: '/'
    }
  ]
})
